/*
 * enc_osd_mgr.h
 *
 *  Created on: 2019年1月5日
 *  Author: Degang.Wu (windragon@126.com)
 *  Desc:
 */

#ifndef ENC_OSD_MGR_H_
#define ENC_OSD_MGR_H_

#undef TCHAR
#undef _T
#include <u/u_sys.h>
#include "enc_shrm.h"

class EncHiOSD : public u::sys::Thread
{
public:
	EncHiOSD(stENC_OSDSET& osd_set);
	virtual ~EncHiOSD();

	U8 get_osdtype();
	std::string get_hash();
	stENC_OSDSET	osd_set;

	static std::string osd_hash(stENC_OSDSET& osd_set);

protected:
	virtual void run();

	void	show_text();
	void 	show_logo();
	void 	show_qr();

private:
	
	std::string 	osdhash;
};

class HiOSDMgr: public u::sys::Thread
{
public:
	HiOSDMgr();
	virtual ~HiOSDMgr();

protected:
	virtual void run();
	void schedule_osd();
	bool osd_is_effect(stENC_OSDSET& osd_set);

private:
	EncHiOSD*	osd_threads[ENC_OSD_MAX_OVERLAY];
};

#endif /* ENC_OSD_MGR_H_ */
